global root "/Volumes/Workgroup/Lab/Lab-heimb/Montenovo/Volunteering Paper/Data"
global results "$root/07_results/RR"
global dictionaries "$root/Dictionaries"


cd "$root"
use appended_analytic_010305111719, clear 
keep if year==2000 | year==2004

*extensive, no fe
eststo extensive_margin: reghdfe whether_volunteer_person  taxprice post_tax_income hourly_wage_aftertax full_time age sex  married black native_amer asian other hispanic HS some_college college_grad college_plus children religion rural, noabsorb vce(cluster state)
*extensive, yr fe
eststo extensive_margin_yrfe: reghdfe whether_volunteer_person  taxprice post_tax_income hourly_wage_aftertax full_time age sex  married black native_amer asian other hispanic HS some_college college_grad college_plus children religion rural, absorb(year) vce(cluster state)
*extensive, year state fe
eststo extensive_margin_stfe: reghdfe whether_volunteer_person  taxprice post_tax_income hourly_wage_aftertax full_time age sex  married black native_amer asian other hispanic HS some_college college_grad college_plus children religion rural, absorb(year state) vce(cluster state)

*extensive, year state individual fe
eststo extensive_margin_fe: reghdfe whether_volunteer_person  taxprice post_tax_income hourly_wage_aftertax full_time age sex  married black native_amer asian other hispanic HS some_college college_grad college_plus children religion rural, absorb(year state unique_id_crossys) vce(cluster state)

drop if year==2010
drop if hours_volunteer_person==0

*intensive, no fe
eststo intensive_margin: reghdfe hours_volunteer_person  taxprice post_tax_income hourly_wage_aftertax full_time age sex  married black native_amer asian other hispanic HS some_college college_grad college_plus children religion rural, noabsorb vce(cluster state)
*intensive, yr fe
eststo intensive_margin_yrfe: reghdfe hours_volunteer_person taxprice post_tax_income hourly_wage_aftertax full_time age sex  married black native_amer asian other hispanic HS some_college college_grad college_plus children religion rural, absorb(year) vce(cluster state)
*intensive, yr state fe
eststo intensive_margin_stfe: reghdfe hours_volunteer_person taxprice post_tax_income hourly_wage_aftertax full_time age sex  married black native_amer asian other hispanic HS some_college college_grad college_plus children religion rural, absorb(year state) vce(cluster state)
*intensive, year state individual fe
eststo intensive_margin_fe: reghdfe hours_volunteer_person taxprice post_tax_income hourly_wage_aftertax full_time age sex  married black native_amer asian other hispanic HS some_college college_grad college_plus children religion rural, absorb(year state unique_id_crossys) vce(cluster state)


cd "$results"

	 esttab extensive_margin extensive_margin_yrfe extensive_margin_stfe extensive_margin_fe using "regress_extensive_2001_2005.rtf", se star(* 0.10 ** 0.05 *** 0.01) replace se(a4) b(a3) title("Extensive Margin") addnotes("Outcome Variable: Whether person volunteered" "Col 1: No FE" "Col 2: Year FE" "Col 3: Year FE and State FE" "Col 4: Year, State, Individual FE") modelwidth(12) label cells(b(star fmt(3)) se(par fmt(3)))
	 
	 esttab intensive_margin intensive_margin_yrfe intensive_margin_stfe intensive_margin_fe using "regress_intensive_2001_2005.rtf", se star(* 0.10 ** 0.05 *** 0.01) replace se(a4) b(a3) title("Intensive Margin") addnotes("Outcome Variable: Total hours the person volunteered"  "Col 1: No FE" "Col 2: Year FE" "Col 3: Year FE and State FE" "Col 4: Year, State, Individual FE") modelwidth(12) label cells(b(star fmt(3)) se(par fmt(3)))
	 
//////////////////////////////////////////////////////////////////////////



cd "$root"
use appended_analytic_010305111719, clear 
keep if year==2000 | year==2010

*extensive, no fe
eststo extensive_margin: reghdfe whether_volunteer_person  taxprice post_tax_income hourly_wage_aftertax full_time age sex  married black native_amer asian other hispanic HS some_college college_grad college_plus children religion rural, noabsorb vce(cluster state)
*extensive, yr fe
eststo extensive_margin_yrfe: reghdfe whether_volunteer_person  taxprice post_tax_income hourly_wage_aftertax full_time age sex  married black native_amer asian other hispanic HS some_college college_grad college_plus children religion rural, absorb(year) vce(cluster state)
*extensive, year state fe
eststo extensive_margin_stfe: reghdfe whether_volunteer_person  taxprice post_tax_income hourly_wage_aftertax full_time age sex  married black native_amer asian other hispanic HS some_college college_grad college_plus children religion rural, absorb(year state) vce(cluster state)

*extensive, year state individual fe
eststo extensive_margin_fe: reghdfe whether_volunteer_person  taxprice post_tax_income hourly_wage_aftertax full_time age sex  married black native_amer asian other hispanic HS some_college college_grad college_plus children religion rural, absorb(year state unique_id_crossys) vce(cluster state)



cd "$results"

	 esttab extensive_margin extensive_margin_yrfe extensive_margin_stfe extensive_margin_fe using "regress_extensive_2001_2011.rtf", se star(* 0.10 ** 0.05 *** 0.01) replace se(a4) b(a3) title("Extensive Margin") addnotes("Outcome Variable: Whether person volunteered" "Col 1: No FE" "Col 2: Year FE" "Col 3: Year FE and State FE" "Col 4: Year, State, Individual FE") modelwidth(12) label cells(b(star fmt(3)) se(par fmt(3)))

	 
//////////////////////////////////////////////////////////////////////////


	 
cd "$root"
use appended_analytic_010305111719, clear 
keep if year==2016 | year==2018

*extensive, no fe
eststo extensive_margin: reghdfe whether_volunteer_person  taxprice post_tax_income hourly_wage_aftertax full_time age sex  married black native_amer asian other hispanic HS some_college college_grad college_plus children religion rural, noabsorb vce(cluster state)
*extensive, yr fe
eststo extensive_margin_yrfe: reghdfe whether_volunteer_person  taxprice post_tax_income hourly_wage_aftertax full_time age sex  married black native_amer asian other hispanic HS some_college college_grad college_plus children religion rural, absorb(year) vce(cluster state)
*extensive, year state fe
eststo extensive_margin_stfe: reghdfe whether_volunteer_person  taxprice post_tax_income hourly_wage_aftertax full_time age sex  married black native_amer asian other hispanic HS some_college college_grad college_plus children religion rural, absorb(year state) vce(cluster state)

*extensive, year state individual fe
eststo extensive_margin_fe: reghdfe whether_volunteer_person  taxprice post_tax_income hourly_wage_aftertax full_time age sex  married black native_amer asian other hispanic HS some_college college_grad college_plus children religion rural, absorb(year state unique_id_crossys) vce(cluster state)

drop if year==2010
drop if hours_volunteer_person==0

*intensive, no fe
eststo intensive_margin: reghdfe hours_volunteer_person  taxprice post_tax_income hourly_wage_aftertax full_time age sex  married black native_amer asian other hispanic HS some_college college_grad college_plus children religion rural, noabsorb vce(cluster state)
*intensive, yr fe
eststo intensive_margin_yrfe: reghdfe hours_volunteer_person taxprice post_tax_income hourly_wage_aftertax full_time age sex  married black native_amer asian other hispanic HS some_college college_grad college_plus children religion rural, absorb(year) vce(cluster state)
*intensive, yr state fe
eststo intensive_margin_stfe: reghdfe hours_volunteer_person taxprice post_tax_income hourly_wage_aftertax full_time age sex  married black native_amer asian other hispanic HS some_college college_grad college_plus children religion rural, absorb(year state) vce(cluster state)
*intensive, year state individual fe
eststo intensive_margin_fe: reghdfe hours_volunteer_person taxprice post_tax_income hourly_wage_aftertax full_time age sex  married black native_amer asian other hispanic HS some_college college_grad college_plus children religion rural, absorb(year state unique_id_crossys) vce(cluster state)


cd "$results"

	 esttab extensive_margin extensive_margin_yrfe extensive_margin_stfe extensive_margin_fe using "regress_extensive_2017_2019.rtf", se star(* 0.10 ** 0.05 *** 0.01) replace se(a4) b(a3) title("Extensive Margin") addnotes("Outcome Variable: Whether person volunteered" "Col 1: No FE" "Col 2: Year FE" "Col 3: Year FE and State FE" "Col 4: Year, State, Individual FE") modelwidth(12) label cells(b(star fmt(3)) se(par fmt(3)))
	 
	 esttab intensive_margin intensive_margin_yrfe intensive_margin_stfe intensive_margin_fe using "regress_intensive_2017_2019.rtf", se star(* 0.10 ** 0.05 *** 0.01) replace se(a4) b(a3) title("Intensive Margin") addnotes("Outcome Variable: Total hours the person volunteered"  "Col 1: No FE" "Col 2: Year FE" "Col 3: Year FE and State FE" "Col 4: Year, State, Individual FE") modelwidth(12) label cells(b(star fmt(3)) se(par fmt(3)))
	 
//////////////////////////////////////////////////////////////////////////	


cd "$root"
use appended_analytic_010305111719, clear 
keep if year==2010 | year==2018

*extensive, no fe
eststo extensive_margin: reghdfe whether_volunteer_person  taxprice post_tax_income hourly_wage_aftertax full_time age sex  married black native_amer asian other hispanic HS some_college college_grad college_plus children religion rural, noabsorb vce(cluster state)
*extensive, yr fe
eststo extensive_margin_yrfe: reghdfe whether_volunteer_person  taxprice post_tax_income hourly_wage_aftertax full_time age sex  married black native_amer asian other hispanic HS some_college college_grad college_plus children religion rural, absorb(year) vce(cluster state)
*extensive, year state fe
eststo extensive_margin_stfe: reghdfe whether_volunteer_person  taxprice post_tax_income hourly_wage_aftertax full_time age sex  married black native_amer asian other hispanic HS some_college college_grad college_plus children religion rural, absorb(year state) vce(cluster state)

*extensive, year state individual fe
eststo extensive_margin_fe: reghdfe whether_volunteer_person  taxprice post_tax_income hourly_wage_aftertax full_time age sex  married black native_amer asian other hispanic HS some_college college_grad college_plus children religion rural, absorb(year state unique_id_crossys) vce(cluster state)

cd "$results"

	 esttab extensive_margin extensive_margin_yrfe extensive_margin_stfe extensive_margin_fe using "regress_extensive_2011_2019.rtf", se star(* 0.10 ** 0.05 *** 0.01) replace se(a4) b(a3) title("Extensive Margin") addnotes("Outcome Variable: Whether person volunteered" "Col 1: No FE" "Col 2: Year FE" "Col 3: Year FE and State FE" "Col 4: Year, State, Individual FE") modelwidth(12) label cells(b(star fmt(3)) se(par fmt(3)))
	 
	
	 
//////////////////////////////////////////////////////////////////////////
